/**
 * 系统管理-对象存储
 */
import request from '@/utils/request'

/**
 * 获取对象存储列表
 * @param query
 */
export function listStorage(query) {
  return request({
    url: '/storage/list',
    method: 'get',
    params: query
  })
}

/**
 * 创建新的对象存储
 * @param data
 */
export function createStorage(data) {
  return request({
    url: '/storage/create',
    method: 'post',
    data
  })
}

/**
 * 删除存储对象
 * @param data
 */
export function deleteStorage(data) {
  return request({
    url: '/storage/delete',
    method: 'post',
    data
  })
}

// 上传路径常量
const uploadPath = process.env.BASE_API + '/storage/create'
export { uploadPath }
